package com.whc.util;

import com.whc.common.exception.MessageException;

import java.util.Objects;

/**
 * @author wang-hai-cheng
 * @since 2021/12/11 13:09
 */
public class AssertUtil {
    public static void isNull(Object o, String message) {
        if (Objects.isNull(o)) {
            throw MessageException.instance(message);
        }
    }

    public static void isFalse(boolean flag, String message) {
        if (!flag) {
            throw MessageException.instance(message);
        }
    }
}